package jtech;

import java.awt.DisplayMode;
import java.awt.Graphics2D;

public class Main extends JTech {

	public static void main(String[] args) {
		new Main().startGame();
	}

	@Override
	protected void init() {
		setFrameRate(120);
		setWindowMode(320, 200);
	}

	@Override
	protected void shutdown() {
	}

	@Override
	protected void update(float elapsedTime) {
		if (isKeyPressed(KEY_ESC)) {
			stopGame();
		}
		if (isKeyPressed(KEY_F1)) {
			setWindowMode(320, 200);
		}
		if (isKeyPressed(KEY_F2)) {
			setFullScreenMode(new DisplayMode(1920, 1080, 32, 0));
		}
		
		
	}

	@Override
	protected void draw(Graphics2D g2d) {
		getDrawer().clearRect(getScreenWidth(), getScreenHeight());
		getDrawer().defaultFont();
		getDrawer().printr(getScreenWidth()-4, 0, "FPS %d\nUPS %d", getFps(), getUps());
	}
	
	
}
